package com.zlx.module_base.base_api.module;

import androidx.lifecycle.LiveData;

import com.zlx.module_base.base_api.res_data.AuctionFriendBean;
import com.zlx.module_base.base_api.res_data.AuctionFriendDetailsBean;
import com.zlx.module_base.base_api.res_data.AuctionTradingBody;
import com.zlx.module_base.base_api.res_data.BaseBean;
import com.zlx.module_base.base_api.res_data.FriendBody;
import com.zlx.module_base.base_api.res_data.MyAuctionFriendBean;
import com.zlx.module_base.base_api.res_data.MyAuctionTradingBean;
import com.zlx.module_network.bean.ApiResponse;

import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface FriendApi {

    /**
     * 竞拍大厅列表
     */
    @GET("appapi/friend/getAuctionFriendList")
    LiveData<ApiResponse<AuctionFriendBean>> getAuctionFriendList(
            @Header("token") String token
    );

    /**
     * 拍卖伴侣
     */
    @POST("appapi/friend/auctionFriend")
    LiveData<ApiResponse<AuctionFriendBean>> auctionFriend(
            @Header("token") String token,
            @Body FriendBody friendBody
    );

    /**
     * 余额支付拍卖相关 创建拍卖
     */
    @FormUrlEncoded
    @POST("appapi/friend/goToPay")
    LiveData<ApiResponse<BaseBean>> goToPay(
            @Header("token") String token,
            @Field("type") String type,
            @Field("money") String money,
            @Field("id") String id,
            @Field("walletPassword") String walletPassword
    );

    /**
     * 竞拍详情
     */
    @GET("appapi/friend/getAuctionFriend")
    LiveData<ApiResponse<AuctionFriendDetailsBean>> getAuctionFriend(
            @Header("token") String token,
            @Query("id") String id
    );

    /**
     * 参与竞拍
     */
    @FormUrlEncoded
    @POST("appapi/friend/auctionTrading")
    LiveData<ApiResponse<BaseBean>> auctionTrading(
            @Header("token") String token,
            @Field("id") String id,
            @Field("money") String money
//            @Body AuctionTradingBody auctionTradingBody
    );

    /**
     * 我的拍卖
     */
    @GET("appapi/friend/myAuctionFriend")
    LiveData<ApiResponse<MyAuctionFriendBean>> myAuctionFriend(
            @Header("token") String token
    );

    /**
     * 我参与的竞拍
     */
    @GET("appapi/friend/myAuctionTrading")
    LiveData<ApiResponse<MyAuctionTradingBean>> myAuctionTrading(
            @Header("token") String token
    );
}
